package com.serviceImpl;

import java.util.List;

import com.dao.*;
import com.entity.*;
import com.service.SubstationService;

public class SubstationServiceImpl implements SubstationService {

	private SubstationDao substationDao;
	
	public void setSubstationDao(SubstationDao substationDao) {
		this.substationDao = substationDao;
	}

	@Override
	public List<Substation> findAllSubstation() {
		return substationDao.findAllSubstation();
	}
	
	@Override
	public List<Substation> findAuditingSubstation() {
		return substationDao.findAuditingSubstation();
	}
	
	public boolean addSubstation(Substation substation){
		return substationDao.addSubstation(substation);
	}
	
	@Override
	public boolean checkSubstationNoAvailable(String substationNo) {
		return substationDao.checkSubstationNoAvailable(substationNo);
	}
	
	@Override
	public List<Substation> substationDetails(String substationNo){
		return substationDao.substationDetails(substationNo);
	}
	
	@Override
	public boolean deleteSubstation(Substation substation){
		return substationDao.deleteSubstation(substation);
	}

	@Override
	public List<Substation> findAllSubstationByAvailable() {
		return substationDao.findAllSubstationByAvailable();
	}

	@Override
	public Substation findSubstatinByNo(String substationNo) {
		return substationDao.findSubstatinByNo(substationNo);
	}
}
